
package frame;

import tree.stm.Stm;
import tree.stm.StmList;

/**
 *
 * */
public class Frag {

        /***/
        private Frame frame;
        /***/
        private StmList treeStm;

        public Frag(Frame frame, Stm treeStm){
                this.frame = frame;
                this.treeStm = new StmList(treeStm, null);
        }

        public StmList getBody() {
                return treeStm;
        }

        /**
         *
         * */
        public void setBody(StmList linearize) {
                treeStm = linearize;
        }

        /**
         *
         * */
        public String print() {
                String fg = new String();
                StmList aux = treeStm;
                for(; aux != null; aux = (StmList) aux.tail){
                        fg += aux.head.print()+ "\n ";
                }
                fg += "\n *******************************************\n";
                return fg;
        }
       
}